import router from "./router";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import useTabbarStore from "@/store/modules/tarbar";

import { versionCheck } from "@/utils/versionCheck";

router.beforeEach(async (to, from, next) => {
  // 先检测版本是否一致,不一致则刷新
  // await versionCheck();

  NProgress.start();
  const tabbarStore = useTabbarStore();
  // tabbarStore.setActiveMenu(to.meta.activeMenu || "Home");
  next();
});

router.afterEach(() => {
  NProgress.done();
});
